cmake_minimum_required(VERSION 3.7)
project(exampleExec)

set(CMAKE_CXX_STANDARD 11)
if(buildsw)
	message("---------------cross tool---------------------")
	set(CMAKE_FIND_ROOT_PATH ${USR_FIND_ROOT} )
	set(CMAKE_CXX_COMPILER ${USR_CXX_COMPILER} )
endif()
#set(CMAKE_FIND_ROOT_PATH /home/yan/Downloads/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2 )
#set(CMAKE_CXX_COMPILER /home/yan/Downloads/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-g++)

set(SRC_DIR_USER ./)
set(INC_DIR_USER ../../inc/sys/)
if (buildsw)
	set(EXECUTABLE_OUTPUT_PATH   ../../../bin/mipi)
	link_directories(
			../../lib/bin/mipi
			../../bin/mipi)
else(NOT buildsw)
	set(EXECUTABLE_OUTPUT_PATH   ../../../bin/gcc)
	link_directories(
			../../lib/bin/gcc
			../../bin/gcc)
endif ()


include_directories(
        ../../inc/
        ../../lib/inc/)

set(SOURCE_FILES main.cpp bSysSubExample.cpp bSysSubExample.h)

add_executable(exampleExec ${SOURCE_FILES})
TARGET_LINK_LIBRARIES(exampleExec pthread bsys growyunba daqsys upladsys serialmod daqtask)
